package com.forevershine.business.persistent.impl;

import org.apache.ibatis.session.SqlSession;

import com.forevershine.business.model.StyleDetail;
import com.forevershine.business.persistent.IDataAccessor;
import com.forevershine.business.persistent.StyleDetailDao;

public class StyleDetailDaoImpl implements StyleDetailDao {

	@Override
	public StyleDetail loadStyleDetail(IDataAccessor dataAccessor, int taskId) {
		SqlSession session = dataAccessor.getSession();
		return (StyleDetail)session.selectOne("selectStyleDetail", taskId);
	}
	
	
	@Override
	public void insertStyleDetail(IDataAccessor dataAccessor, StyleDetail styleDetail) {
		SqlSession session = dataAccessor.getSession();
		session.insert("insertStyleDetail", styleDetail);
		session.commit();
	}

}
